//
//  WCNPatientHomeTCell.m
//  WCN
//
//  Created by 杨鑫 on 15/6/15.
//  Copyright (c) 2015年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCNPatientHomeTCell.h"
//
#import "NSString+Utilities.h"
//
#import "Macros.h"

@interface WCNPatientHomeTCell ()

@property (weak, nonatomic) IBOutlet UILabel *part;
@property (weak, nonatomic) IBOutlet UILabel *level;
@property (weak, nonatomic) IBOutlet UILabel *status;
@property (weak, nonatomic) IBOutlet UIImageView *statusImg;

@end

@implementation WCNPatientHomeTCell

- (void)awakeFromNib {
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setLevelText:(NSString *)level
{
    self.level.text = level;
    if ([@"特级" isEqualToString:level]) {
        self.level.textColor = HexRGB(0xea1311);
    } else if ([@"一级" isEqualToString:level]) {
        self.level.textColor = HexRGB(0xff34b3);
    } else if ([@"二级" isEqualToString:level]) {
        self.level.textColor = HexRGB(0x00abf1);
    } else if ([@"三级" isEqualToString:level]) {
        self.level.textColor = HexRGB(0x00baa0);
    }
}

- (void)setPartText:(NSString *)part
{
    if ([part isEmpty] || !part) {
        self.part.text = @"";
//        self.part.textColor = HexRGB(0x61606b);
    } else {
        self.part.text = part;
//        self.part.textColor = [UIColor blackColor];
    }
}

- (void)setStatus:(NSString *)status text:(NSString *)statusText
{
    self.status.text = statusText;
    if ([@"MONITORING" isEqualToString:status]) {
        self.statusImg.image = nil;//[UIImage imageNamed:@"Patient_Caring"];
        self.status.textColor = HexRGB(0xEC1211);
    } else if ([@"NURSING" isEqualToString:status]) {
        self.statusImg.image = nil;
        self.status.textColor = HexRGB(0xEC1211);
    } else {
        self.statusImg.image = nil;//[UIImage imageNamed:@"Patient_NoCaring"];
        self.status.textColor = HexRGB(0xc5c9d2);
    }
}

@end
